﻿<Window x:Class="StackHash.ProductProperties"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:StackHash"
        Title="Product Properties - StackHash" Width="400" MinWidth="400" Height="450" MinHeight="450" Icon="/StackHash;component/StackHash.ico" ShowInTaskbar="False" WindowStartupLocation="CenterOwner" Loaded="Window_Loaded" Closed="Window_Closed">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="MasterResources.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <Window.CommandBindings>
        <CommandBinding Command="Help" x:Name="commandBindingHelp" Executed="commandBindingHelp_Executed" />
    </Window.CommandBindings>
    <Grid Name="gridMain">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <TabControl Margin="10" Name="tabControl">
            <TabItem Header="Collection Policy" Name="tabItemCollectionPolicy">
                <local:CollectionPolicyControl Margin="3" x:Name="collectionPolicyControl" />
            </TabItem>
            <TabItem Header="Display Filter" Name="tabItemDefaultDisplayFilter">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <TextBlock Margin="5,5,5,12" TextWrapping="Wrap">The product display filter prevents low hit count events from being shown for this product. If no filter is set the default display filter will be used (see Tools -> Client Options).</TextBlock>
                    <local:DisplayPolicyControl Grid.Row="1" x:Name="displayPolicyControl" />
                </Grid>
            </TabItem>
        </TabControl>

        <Border Grid.Row="1" Style="{StaticResource ButtonBorder}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>

                <Button Margin="10" Command="Help">_Help</Button>

                <StackPanel Grid.Column="1" Margin="7" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom">
                    <Button Margin="3" Name="buttonOK" IsDefault="True" Click="buttonOK_Click">OK</Button>
                    <Button Margin="3" IsCancel="True" Name="buttonCancel" Click="buttonCancel_Click">Cancel</Button>
                </StackPanel>

            </Grid>
        </Border>

    </Grid>
</Window>
